package com.group9.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.annotation.Resource;

/**
 * Created by Lcouncillor on 2020/6/3.
 */
@Document(collection = "comment_message")
public class CommentMessage {
    @Id
    private String id;

    @Field(value = "sender_id")
    private String senderId;

    @Field(value = "sender_name")
    private String senderName;

    @Field(value = "receiver_id")
    private String receiverId;

    @Field(value = "receiver_name")
    private String receiverName;

    private String content;

    /**
     * 接收评论的资源Id
     */
    @Field(value = "comment_id")
    private String commentId;

    @Field(value = "comment_senter_name")
    String commentSenterName;

    /**
     * 0表示已读，1表示未读，-1表示已删除
     */
    private Integer status;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(String receiverId) {
        this.receiverId = receiverId;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCommentId() {
        return commentId;
    }

    public void setCommentId(String commentId) {
        this.commentId = commentId;
    }

    public String getCommentSenterName() {
        return commentSenterName;
    }

    public void setCommentSenterName(String commentSenterName) {
        this.commentSenterName = commentSenterName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "CommentMessage{" +
                "id='" + id + '\'' +
                ", senderId='" + senderId + '\'' +
                ", senderName='" + senderName + '\'' +
                ", receiverId='" + receiverId + '\'' +
                ", receiverName='" + receiverName + '\'' +
                ", content='" + content + '\'' +
                ", commentId='" + commentId + '\'' +
                ", commentSenterName='" + commentSenterName + '\'' +
                ", status=" + status +
                '}';
    }
}
